import logging
import logging.config as lc

lc.fileConfig('../common/logger.conf')

def train_procedure(model,dataset):
    '''
    描述训练及基准测试过程

    Args:
        model: Model类型变量，模型接口
        dataset: 数据集目录

    Returns:
        无
    '''
    model.init()
    while True:
        # 训练开始采集点
        model.train()
        #训练结束采集点
        model.save()
        if model.shouldStop():
            break
    logging.info('%s train benchmark test finished'%model.name)